readHashMap
open fun <K, V> readHashMap(@NonNull in: Parcel, @Nullable loader: ClassLoader, @NonNull clazzKey: Class<out K>, @NonNull clazzValue: Class<out V>): HashMap<K, V>(source)
Same as readHashMap but accepts clazzKey
and clazzValue
parameter as the types required for each key and value pair. Compatibility behavior:
- SDK 34 and later, this method matches platform behavior.
- SDK 33 and below, this method will not check the map entries' types.
Throws
if the item to be deserialized is not an instance of that class or any of its children class.